# @author Cweili
# @version 13-9-14 下午12:29

updateList = null

delCustomer = (ids) ->
	$.post 'ipgroup/adminDel', 'ids=' + ids, (data) ->
		updateList()

$ ->

	updateList = ->
		list 'ipgroup/list', '', '#list', (item) ->
			item.operatorTemplate = operatorTemplate(item.id)
			render('listTpl', item)

	$('#editorModal').find('form').submit (e) ->
		e.preventDefault()
		save 'ipgroup/adminSave', (data) ->
			saveAction(data, updateList)

	updateList()